#pragma once

#include "../VulkanRHI.h"
#include "../../Core/CoreGlobals.h"
#include "RHIShader.h"
#include "ShaderMacros.h"
#include "ShaderMap.h"

#include "../Texture/RHISampler.h"
#include "../Texture/RHITexture.h"
#include "../Buffer/BufferView.h"
#include "../Buffer/RHIBuffer.h"
#include "../Raytracing/AccelerationStructure.h"

class QuadVertexShader : public RHIShader
{
	DECLARE_SHADER_BEGIN(QuadVertexShader)

	DECLARE_SHADER_END()
};

class QuadFragmentShader : public RHIShader
{
	DECLARE_SHADER_BEGIN(QuadFragmentShader)

	DECLARE_SHADER_END()

	PARAM_COMBINED_IMAGE_SAMPLER(samplerColor);
};

class ImguiVertexShader : public RHIShader
{
	DECLARE_SHADER_BEGIN(ImguiVertexShader)

	DECLARE_SHADER_END()
};

class ImguiFragmentShader : public RHIShader
{
	DECLARE_SHADER_BEGIN(ImguiFragmentShader)

	DECLARE_SHADER_END()
};


class CoordinatePaintVertexShader : public RHIShader
{
	DECLARE_SHADER_BEGIN(CoordinatePaintVertexShader)

	SET_INPUT_ASSEMBLY(VK_PRIMITIVE_TOPOLOGY_LINE_LIST);

	DECLARE_SHADER_END()
};

class CoordinatePaintFragmentShader : public RHIShader
{
	DECLARE_SHADER_BEGIN(CoordinatePaintFragmentShader)

	DECLARE_SHADER_END()
};

class CoordinateQuadVertexShader : public RHIShader
{
	DECLARE_SHADER_BEGIN(CoordinateQuadVertexShader)

	DECLARE_SHADER_END()
};

class CoordinateQuadFragmentShader : public RHIShader
{
	DECLARE_SHADER_BEGIN(CoordinateQuadFragmentShader)

	DECLARE_SHADER_END()

	PARAM_COMBINED_IMAGE_SAMPLER(coordinateColor);

	PARAM_COMBINED_IMAGE_SAMPLER(samplerColor);
};


















#if 0
class IndirectdrawVertexShader : public RHIShader
{
	DECLARE_SHADER_BEGIN(IndirectdrawVertexShader)

	GROUP_VERTEX_BINGING_OFFSET({ {"inPos", 0}, {"inNormal", 12}, {"inColor", 32} }, VK_VERTEX_INPUT_RATE_VERTEX, 96);
	GROUP_VERTEX_BINGING({ "instancePos", "instanceScale" }, VK_VERTEX_INPUT_RATE_INSTANCE);

	DECLARE_SHADER_END()
};

class ClothVertexShader : public RHIShader
{
	DECLARE_SHADER_BEGIN(ClothVertexShader)

	DECLARE_SHADER_END()
};

class ClothComputeShader : public RHIShader
{
	DECLARE_SHADER_BEGIN(ClothComputeShader)

	DECLARE_SHADER_END()
};

class GeometryVertexShader : public RHIShader
{
	DECLARE_SHADER_BEGIN(GeometryVertexShader)

	DECLARE_SHADER_END()
};

class GeometryFragmentShader : public RHIShader
{
	DECLARE_SHADER_BEGIN(GeometryFragmentShader)

	DECLARE_SHADER_END()
};

class PbrVertexShader : public RHIShader
{
	DECLARE_SHADER_BEGIN(PbrVertexShader)

	DECLARE_SHADER_END()
};

class PbrFragmentShader : public RHIShader
{
	DECLARE_SHADER_BEGIN(PbrFragmentShader)

	PUSH_CONSTANT_OFFSET(sizeof(glm::vec3));

	DECLARE_SHADER_END()
};

class ParticleCalculateComputeShader : public RHIShader
{
	DECLARE_SHADER_BEGIN(ParticleCalculateComputeShader)

	DECLARE_SHADER_END()

	SHADER_PARAM_CONSTANT(SHARED_DATA_SIZE, int32);
	SHADER_PARAM_CONSTANT(GRAVITY, float);
	SHADER_PARAM_CONSTANT(POWER, float);
	SHADER_PARAM_CONSTANT(SOFTEN, float);

};

class SceneFragmentShader : public RHIShader
{
	DECLARE_SHADER_BEGIN(SceneFragmentShader)

	DECLARE_SHADER_END()

};

class CullComputeShader : public RHIShader
{
	DECLARE_SHADER_BEGIN(CullComputeShader)

	DECLARE_SHADER_END()
};

class DescriptorindexingFragmentShader : public RHIShader
{
	DECLARE_SHADER_BEGIN(DescriptorindexingFragmentShader)

	DECLARE_SHADER_END()

};

class CompositionFragmentShader : public RHIShader
{
	DECLARE_SHADER_BEGIN(CompositionFragmentShader)

	DECLARE_SHADER_END()

	PARAM_INPUT_ATTACHMENT(samplerposition);
	PARAM_INPUT_ATTACHMENT(samplerNormal);
	PARAM_INPUT_ATTACHMENT(samplerAlbedo);
	PARAM_UNIFORM_BUFFER(ubo);
};
#endif

//class BaseVertexShader : public RHIShader
//{
//	DECLARE_SHADER_BEGIN(BaseVertexShader)
//
//	DECLARE_SHADER_END()
//};
//
//class BasePixelShader : public RHIShader
//{
//	DECLARE_SHADER_BEGIN(BasePixelShader)
//
//	DECLARE_SHADER_END()
//};

//SHADER_PARAM_CONSTANT(float, NumLights);
//SHADER_PARAM_PUSHCONST(UINT64, 12);
//SHADER_PARAM_SAMPLER_ARRAY_SET(CbSampler, 0, 0, 3);
//SHADER_PARAM_UNIFORM_BUFFER_ARRAY_SET(UboBuffer, 0, 0, 5);
//
//SHADER_PARAM_INPUT_ATTACHMENT_SET(ReText, 0, 1, 0);
//SHADER_PARAM_INLINE_UNIFORM_BLOCK_EXT_SET(sizeof(uint32), HhAA, 0, 0);
//SHADER_PARAM_ACCELERATION_STRUCTURE_KHR_SET(ss, 0, 0);


